package com.zr.serviceimpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.CBBStationDao;
import com.zr.model.Cdisstation;
import com.zr.service.CBBStationService;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Service("cbbsseim")
public class CBBStationServiceImpl implements CBBStationService{
	@Resource
	private CBBStationDao CBBSdaim;
	@Override
	public JSONArray findStation() {
		JSONArray ja=new JSONArray();		
		List<Cdisstation>li=CBBSdaim.findStation();
		for (Cdisstation cdisstation : li) {
			JSONObject jo=new JSONObject();
			jo.put("id", cdisstation.getDisid());
			jo.put("text", cdisstation.getDisname());
			ja.add(jo);
		}
		return ja;
	}

}
